using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;

public class PlayerWalkingState : PlayerMovingState
{
    public PlayerWalkingState(PlayerMovementMachine playerMovementMachine) : base(playerMovementMachine)
    {
    }

#region IState Methods
    public override void Enter()
    {
        base.Enter();
        StartAnimation(StateMachine.Player.AnimationData.WalkParameterHash);
        StateMachine.ReusableData.MovementSpeedModify =
            StateMachine.Player.Data.PlayerGroundedData.WalkData.SpeedModify;
        
        StateMachine.ReusableData.CurrentJumpForce = airborneData.JumpData.WeakForce;
    }

    public override void Exit()
    {
        base.Exit();
        StopAnimation(StateMachine.Player.AnimationData.WalkParameterHash);
    }
#endregion

#region Input Methods
    protected override void OnMovementCanceled(InputAction.CallbackContext context)
    {
        StateMachine.ChangeState(StateMachine.LightStoppingState);
    }

    protected override void OnWalkToggleStated(InputAction.CallbackContext context)
    {
        base.OnWalkToggleStated(context);
        StateMachine.ChangeState(StateMachine.RunningState);
    }
    
    protected override void OnDashStarted(InputAction.CallbackContext context)
    {
    }
#endregion
}